package com.study.controller;

import com.study.entity.DataDictionary;
import com.study.service.IDataDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("dataDictionary")
public class DataDictionaryController {
    @Autowired
    private IDataDictionaryService dataDictionaryService;

    @RequestMapping("goodsType")
    @ResponseBody
    public List<DataDictionary> getGoodsTypes(){
        DataDictionary dictionary=new DataDictionary();
        dictionary.setTypeCode("good_type");
        return dataDictionaryService.selectGoodsTypeList(dictionary);
    }
}
